package android.slc.popup.impl;

import android.slc.popup.SlcPopup2;
import android.view.View;
import android.widget.TextView;

/**
 * @author slc
 * @date 2021/4/29 11:51
 */
public class LoadingDialogOperateImpl extends DialogOperateImpl implements SlcPopup2.LoadingDialogOperate {

    @Override
    public void updateMessage(String message) {
        if (getDialog() != null) {
            View decorView = getDialog().getWindow().getDecorView();
            if (decorView != null) {
                TextView messageTextView = getDialog().findViewById(android.R.id.message);
                if (messageTextView != null) {
                    messageTextView.setText(message);
                }
            }
        }
    }

}
